home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / fidoadr.zip / README.TXT < prev    next >
Text File  |  1992-03-07  |  3KB  |  103 lines

  1. FIDOADR.C - 3/7/92 - David H. Bennett - V1.0
  2.  
  3. - Intro
  4.  
  5.   These are some useful routines for parseing Fidonet addresses.  They
  6.   are rather generic and should compile on =any= ANSI C compiler that 
  7.   is worth it's salt.
  8.  
  9.   There's nothing more depressing than seeing a new 'C' library come
  10.   across the PDN or your BBS only on un-archive it and find out it's
  11.   some small model library asking for a shareware contribution.  It's
  12.   nice to open an archive every now and then that's free with no dollar
  13.   signs in the documentation :)
  14.  
  15. - License, Ethical and Legal ramifications for the use of this highly
  16.   important and leading edge high technology software.
  17.  
  18.   (null)
  19.  
  20. - Files
  21.  
  22.   FATEST   C        1637 03-07-92   2:30p     Test Program
  23.   FATEST   EXE     12840 03-07-92   2:30p     Test Program
  24.   FIDOADR  C        3612 03-07-92   2:52p     C Source.
  25.   FIDOADR  H         748 03-03-92  11:04p     Header file
  26.   FIDOADR  TST       174 02-20-91   1:18a     Test Data
  27.   README   TXT      2287 03-07-92   2:52p     Your Reading It....
  28.   RESULTS  TXT      1982 03-07-92   2:30p     Results of the tests
  29.   TESTIT   BAT        36 03-07-92   2:28p     Batch file to run tests on funcs
  30.  
  31. - Structures:
  32.  
  33.   FIDOADR - Used to hold a 'C' structured fido address for program
  34.             processing.
  35.  
  36.   /*
  37.    * Net node spec
  38.    */
  39.   typedef struct {
  40.       word zone;          /* Fidonet zone */
  41.       word net;           /*         net */
  42.       word node;          /*         node */
  43.       word point;         /*         point */
  44.       char domain[64];    /*         domain */
  45.   } FIDOADR;                 
  46.  
  47.   You can declare in your ANSI 'C' programs using the declaration:
  48.  
  49.     FIDOADR fa=DEF_FIDOADR;
  50.  
  51.   which will start you with a clean slate.
  52.  
  53. - Routines
  54.  
  55.  
  56.   void fidoadr_split(char *addr, FIDOADR *fadr)
  57.   -------------------------------------------------
  58.     This routine splits the null terminated ASCII representation of
  59.     a fidonet address into a FIDOADR structure.
  60.  
  61.  
  62.   char *fidoadr_merge(char *addr, FIDOADR *fadr)
  63.   -------------------------------------------------
  64.     This routine merges a FIDOADR structure into a ASCII representation
  65.     of the fidonet address.
  66.  
  67.  
  68.   char *fidostr(char *dest, word zone, word net, word node)
  69.   -------------------------------------------------
  70.     Return a simple 3D fido address given zone:net/node.
  71.  
  72.  
  73.   void fidosplit(char *src, word *zone, word *net, word *node)
  74.   -------------------------------------------------
  75.     Split a simple 3D address into three zone, net, & node.
  76.  
  77.  
  78.   void hexadr_split(char *hexadr, word *net, word *node)
  79.   -------------------------------------------------
  80.     Split a 2D fido hex address (Used by BinkleyTerm and other programs)
  81.     into a net and node.
  82.  
  83.  
  84.   char *hexadr_merge(char *hexadr, word net, word node)
  85.   -------------------------------------------------
  86.     Convert a 2D net and node number into a 8-character hex representation
  87.     of the address.
  88.  
  89.  
  90. - Conclusion
  91.  
  92.   If you have any comments, suggestions, additions, please send them to:
  93.  
  94.   Fido: David Bennett @ 1:280/307
  95.   Internet: root@kcufgat.fidonet.org
  96.   CIS: 74635,1671
  97.   Fax: 816/796-8288
  98.   BBS: 816/228-3204
  99.  
  100. Have Func,
  101. --Dave
  102.  
  103.